package com.yanqu.road.server.cmd.activity.fellingtrees;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.FellingTreesProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameProtocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = CrossProtocol.C2_CROSS_FELLING_TREES_SEE_RANK_EQUIP, desc = "")
public class CrossFellingTreesSeeRankEquipCmd extends CrossCommand {

    private FellingTreesProto.CrossFellingTreesSeeRankEquipReqMsg reqMsg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        reqMsg = FellingTreesProto.CrossFellingTreesSeeRankEquipReqMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        YanQuMessage message = YanQuMessageUtils.buildMessage(GameProtocol.S_FELLING_TREES_SEE_RANK_EQUIP_FROM_CROSS, reqMsg.toBuilder());
        MessageHelper.sendPacket(reqMsg.getReq().getServerId(), 0, message);
    }

    @Override
    public void sendData() {

    }
}
